Exercise 17.2 By Waqas Nasir